home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_130 / hp / hp_graphics1.include < prev    next >
Text File  |  1992-05-06  |  2KB  |  78 lines

  1. /*--------------------------------------------------*/
  2. /*    Filename:  hp_graphics1.include               */
  3. /*                                                  */
  4. /*    Contains C source code for the routine        */
  5. /*    SetUpHpGraphics, which is used by hp.c        */
  6. /*                                                  */
  7. /*--------------------------------------------------*/
  8.  
  9. SetUpHpGraphics()
  10. {
  11.   /*  Use default topaz font, but in 80-column size:  */
  12.   Topaz_Eight.ta_Name = "topaz.font";
  13.   Topaz_Eight.ta_YSize = 8;
  14.   Topaz_Eight.ta_Style = FS_NORMAL;
  15.   Topaz_Eight.ta_Flags = FPB_ROMFONT;
  16.  
  17.   /*  Define properties new screen is to have:        */
  18.   ns.LeftEdge     =   0;
  19.   ns.TopEdge      =   0;
  20.   ns.Width        = 640;
  21.   ns.Height       = 200;
  22.   ns.Depth        =   3;
  23.   ns.DetailPen    =   1;
  24.   ns.BlockPen     =   2;
  25.   ns.ViewModes    = HIRES;
  26.   ns.Type         = CUSTOMSCREEN;
  27.   ns.Font         = &Topaz_Eight;
  28.   ns.DefaultTitle = "    \0";
  29.   ns.Gadgets      = NULL;
  30.   ns.CustomBitMap = NULL;
  31.  
  32.   hp_screen = OpenScreen( &ns );
  33.   if ( hp_screen == NULL ) exit();
  34.  
  35.   /*   Describe new window:      */
  36.   nw.LeftEdge    =    0;
  37.   nw.TopEdge     =    0;
  38.   nw.Width       =  640;
  39.   nw.Height      =  200;
  40.   nw.DetailPen   =   -1;
  41.   nw.BlockPen    =   -1;
  42.   nw.IDCMPFlags  = CLOSEWINDOW | MOUSEBUTTONS;
  43.   nw.Type        = CUSTOMSCREEN;
  44.   nw.Flags       = WINDOWCLOSE | SMART_REFRESH | ACTIVATE |
  45.                    NOCAREREFRESH ;
  46.   nw.FirstGadget = NULL;
  47.   nw.CheckMark   = NULL;
  48.   nw.Screen      = hp_screen;
  49.   nw.Title       = "( hp )";
  50.   nw.BitMap      = NULL;
  51.   nw.MinWidth    =    0;
  52.   nw.MinHeight   =    0;
  53.   nw.MaxWidth    =    0;
  54.   nw.MaxHeight   =    0;
  55.  
  56.   hp_window = OpenWindow( &nw );
  57.   if (hp_window == NULL)    exit();
  58.  
  59.   WindowToFront(hp_window);
  60.  
  61.   rp = hp_window -> RPort;
  62.   vp = &hp_screen -> ViewPort;
  63.  
  64.   SetRGB4( vp, 0,  3,  4,  3 );     /*  grey   */
  65.   SetRGB4( vp, 1, 10, 10,  7 );     /*  tan    */
  66.   SetRGB4( vp, 2,  0,  0,  0 );     /*  black  */
  67.   SetRGB4( vp, 3, 12,  9,  0 );     /*  yellow */
  68.   SetRGB4( vp, 4,  4,  6,  9 );     /*  blue   */
  69.   SetRGB4( vp, 5,  7,  7,  5 );     /*  grey   */
  70.   SetRGB4( vp, 6, 10,  0,  0 );     /*  red    */
  71.   SetRGB4( vp, 7,  0, 10,  0 );     /*  green  */
  72.  
  73.   display_red   = 7;
  74.   display_green = 7;
  75.   display_blue  = 5;
  76.  
  77. }
  78.